<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    群组名称-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('群组名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>


<!--    头像-->
    <div class="form-group">
        <label for="c-pic" class="control-label col-xs-12 col-sm-2">{:__('群组头像')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <!--class .hidden隐藏输入框,style="display: table;"按钮靠左-->
                <input id="c-pic" data-rule="" class="form-control hidden" size="50" name="row[pic]" type="text"
                       value="{$row.pic}">
                <div class="input-group-addon no-border no-padding" style="display: table;">
                    <span>
                        <button type="button"
                                data-url="upload_file/uploadOBS"
                                id="faupload-pic"
                                class="btn btn-danger faupload"
                                data-input-id="c-pic"
                                data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
                                data-multiple="false"
                                data-preview-id="p-pic">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                    <span><button type="button" id="fachoose-pic" class="btn btn-primary fachoose"
                                  data-input-id="c-pic" data-mimetype="image/*" data-multiple="false"><i
                            class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-pic"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-pic"></ul>
        </div>
    </div>


<!--    群主-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('群主')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>

    <!--排序-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('排序')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sort" class="form-control" name="row[sort]" type="number" step="1" min="0" data-rule="required;digits;integer;range(0~)" value="0" placeholder="数字越大排序越靠前">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
